import upload from '@/utils/upload'
import request from '@/utils/request'

//微信支付
export function uploadAvatar({ }) {
    return upload({
        url: '/order/generateVipOrder',
        name: data.name,
        filePath: data.filePath
    })
}
//生成VIP订单
export function generateVipOrder({ price, vipType }) {
    return request({
        url: '/order/generateVipOrder',
        method: 'post',
        data: {
            price,
            vipType
        }
    })
}
//生成订单
export function generateOrder(data) {
    return request({
        url: '/order/generateOtherOrder',
        method: 'post',
        data: data
    })
}
//根据id进行支付
export function payOrder(orderId) {
    return request({
        url: '/order/payOrder?orderId=' + orderId,
        method: 'get'
    })
}
